--
-- Description: Script to stamp the processing start and end dates
-- in the Log table for the input Log id.
-- Date created: 2 May 2008
--

set ANSI_NULLS on
set QUOTED_IDENTIFIER on
go

--
-- drop the stored procedure if it exists and recreate it.
--
if exists
(
	select * 
	from sys.objects
	where object_id = object_id(N'[stampLog_sp]')
	and type in (N'P', N'PC')
)
begin
    drop procedure [dbo].[stampLog_sp]
end
go

create procedure [dbo].[stampLog_sp]
(
	@LogID int
	, @ProcessingStartDate smalldatetime
	, @ProcessingEndDate smalldatetime
)
as
begin
	--
	-- update the processing start and end dates columns
	-- for the input log id.
	--
	update [dbo].[Logs]
	set ProcessingStartDate = @ProcessingStartDate
		, ProcessingEndDate = @ProcessingEndDate
	where LogID = @LogID
end
go

set ansi_nulls off
go
set quoted_identifier off
go
